<?php
require './includes/config.php';
session_start();
if(isset($_POST['login']))
{
$username = $_POST['user'];
$password = $_POST['pswd'];
if ($username == $config['login_user'] and $password == $config['login_pass'] ) { //Replace mypassword with your password it login
	$_SESSION['phplogin'] = true;
	header('Location: index.php'); //Replace index.php with what page you want to go to after succesful login
	exit;
} else {
?>
<script type="text/javascript">
<!--
alert('Wrong Username or Password, Please Try Again')
//-->
</script>
<?php
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> PHP Login </title>
</head>
<body>
<center>
  <form method="post" action="">
  user: 
  <input type="text" name="user">
  pass: 
  <input type="password" name="pswd">
<input type="submit" name="login" value="Login">
</form>
</center>
</body>
</html>
